<!-- head -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>管理中心</a></li>
			<li class="active"><strong>商户预警配置</strong></li>
		</ol>
	</div>
</div>

<!-- content-->
<div class="wrapper wrapper-content animated fadeIn"
	ng-controller="queryMerWarningConfigCtrl">
	<form class="form-horizontal" id="form1">
		<div class="row">
			<div class="col-lg-12">
				<div class="panel-body ibox float-e-margins">
					<div class="ibox-title">
						<h5>商户预警配置</h5>
						<!--<div ibox-tools></div>-->
					</div>
					<div class="ibox-content">
						<div class="form-group">
							<label class="col-sm-2 control-label">服务ID：</label>
							<div class="col-sm-2">
								<input type="text" class="form-control" ng-model='baseInfo.id'>
							</div>
							<label class="col-sm-2 control-label">服务名称：</label>
							<div class="col-sm-2">
								<select class="form-control" ng-model='baseInfo.warningType'
									ng-options="x.value as x.text for x in warningTypes">
									<option value="" selected="selected" class="">全部</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-8">
								<button class="btn btn-primary6 btn-mr20" type="button" id="btnSubmit"
									ng-click="queryFunc()">查询</button>
								<button class="btn btn-primary3 btn-mr20" type="button" ng-click="resetForm()">清空</button>
								<a class="btn btn-primary5" ng-click="merWarningAddModel()"  type="button">新增</a>
							</div>
						</div>
					</div>
				</div>

				<div class="panel-body ibox float-e-margins">
					<div class="ibox-title">
						<!--<div ibox-tools="" class="ng-scope"></div>-->
					</div>
					<div class="ibox-content">
						<div class="gridStyle" ui-grid="merWarningGrid" ui-grid-pagination ui-grid-resize-columns></div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<div id="merWarningAddModel" class="modal fade" tabindex="3"
		 role="dialog">
		<form class="form-horizontal" id="form2">
			<div class="modal-dialog" style="width: 900px">
				<div class="modal-content" >
					<div class="modal-header">
						<button type="button" class="close" ng-click='cancel()' data-dismiss="modal">
							&times;</button>
						<h3 class="modal-title">{{title}}</h3>
					</div>
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>服务名称:</label>
							<div class="col-sm-4">
								<select class="form-control" id="warningType" ng-model="info.warningType"
										ng-options="x.value as x.text for x in warningTypes">
									<option value="" disabled selected>请选择服务</option>
								</select>
							</div>
						</div>
						<div class="form-group" ng-show="info.warningType=='NO_TRAN'">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>统计天数:</label>
							<div class="col-sm-3" style="float:left">
								<input type="number" ng-model="info.noTranDay"
									   class="form-control" style="display: inline-block;float:left;">
							</div>
							<div class="col-sm-6" style="float:left; padding:7px 0 0 10px"> 天及以上</div>
						</div>

						<div class="form-group" ng-show="info.warningType=='TRAN_SLIDE'">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>统计百分比:</label>
							<div class="col-sm-3" style="float:left">
								<input type="text" ng-model="info.tranSlideRate"
									   class="form-control" style="display: inline-block;float:left;">
							</div>
							<div class="col-sm-6" style="float:left; padding:7px 0 0 10px"> %及以上</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>所属组织:</label>
							<div class="col-sm-4">
								<div  class="gridStyle grid" style="height: 200px;width: 220px" ui-grid="teamGrid" ui-grid-selection ui-grid-resize-columns ></div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>展示标题:</label>
							<div class="col-sm-4">
								<input type="text" ng-model="info.warningTitle"
									   class="form-control" style="width: auto; display: inline-block;">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>跳转链接:</label>
							<div class="col-sm-4">
								<input type="text" ng-model="info.warningUrl"
									   class="form-control" style="width: auto; display: inline-block;">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>展示图标:</label>
							<div class="col-sm-4">
								<div class="col-img" ng-if="info.warningImgUrl!=null&&info.warningImgUrl!=''">
									<a href="{{info.warningImgUrl}}" fancybox rel="group">
										<img width="250px" height="150px" ng-src="{{info.warningImgUrl}}"/>
									</a>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"></label>
							<div class="col-sm-4" >
								<input type="file" nv-file-select="" uploader="uploaderImg1" multiple  />
								<table class="table" class="col-sm-4" >
									<tbody>
									<tr ng-repeat="item in uploaderImg1.queue">
										<td>
											<div ng-show="uploaderImg1.isHTML5" ng-thumb="{ file: item._file, height: 100 }"></div>
										</td>
										<td nowrap>
											<!--<button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
												<span class="glyphicon glyphicon-trash"></span> 删除
											</button>-->
										</td>
									</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="form-group control-label">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-6">
								<button class="btn btn-primary btn-mr20" type="button"
										ng-click='saveInfo()'>确定</button>
								<button class="btn btn-primary8 " type="button"
										ng-click='cancel()'>取消</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>